1 00:00:00,600 --> 00:00:01,690 ‫Welcome back. 2 00:00:01,710 --> 00:00:05,700 ‫This is the extra faith saw in the last election. 3 00:00:05,780 --> 00:00:13,920 ‫This election, after we wrote this EPA awesome EPA of ours, we were able to access the data using 4 00:00:13,920 --> 00:00:20,720 ‫Postman when we supplied an EPA kikhia that this authorization was able to send and get back the data. 5 00:00:21,120 --> 00:00:23,480 ‫But when we removed it, we are not able to get the data. 6 00:00:23,790 --> 00:00:28,920 ‫And then the other thing that we are supposed to look at in this one is to make sure that this one retains 7 00:00:28,920 --> 00:00:31,770 ‫something that is called something that is consumable. 8 00:00:32,040 --> 00:00:38,400 ‫Because when you send this data to our mobile, to an endpoint which is consuming this EPA, maybe a 9 00:00:38,400 --> 00:00:47,610 ‫mobile app or probably an application made with Regard View or Andula or any other front end application 10 00:00:47,940 --> 00:00:52,630 ‫is not going to know what is ERP or whatever or whatever is not going to know is this is not true. 11 00:00:52,800 --> 00:00:57,480 ‫So you need to supply the key in the value format of an API. 12 00:00:57,480 --> 00:01:01,380 ‫So in this one I'm going to be showing you exactly that in how we are going to do. 13 00:01:02,400 --> 00:01:09,960 ‫First of all, let me let me make this API able to work without that a lot, without talking in how 14 00:01:09,960 --> 00:01:11,250 ‫we do in ERP next. 15 00:01:11,460 --> 00:01:13,710 ‫Is that in the front door to at least function? 16 00:01:13,890 --> 00:01:17,540 ‫What do we need to do to convert this into a public or open API? 17 00:01:17,760 --> 00:01:24,450 ‫You just tell it to allow guests and you set it to through. 18 00:01:24,840 --> 00:01:25,870 ‫It is as simple as that. 19 00:01:26,040 --> 00:01:28,240 ‫Europeanised so allow guest equals true. 20 00:01:28,440 --> 00:01:32,630 ‫So now when I come to this application unsent, I am going to get my data back. 21 00:01:32,640 --> 00:01:34,770 ‫You see, I do not have an authorization. 22 00:01:34,950 --> 00:01:36,540 ‫I do not need it there. 23 00:01:36,690 --> 00:01:40,090 ‫And now I can send and get my data back even without it. 24 00:01:40,410 --> 00:01:44,580 ‫So this is the only thing that we need to do in the front with this function. 25 00:01:44,790 --> 00:01:47,010 ‫Allow guest said it to through. 26 00:01:47,490 --> 00:01:50,070 ‫Now, the next thing that we need to just look at this. 27 00:01:50,080 --> 00:01:51,720 ‫Look, look, look at what we are getting. 28 00:01:51,730 --> 00:01:55,020 ‫Yarragadee, the response we are getting here, the response is not good. 29 00:01:55,020 --> 00:01:59,910 ‫It is it is not something you can send to the front end developer and tell them that you are finished 30 00:01:59,910 --> 00:02:00,390 ‫to Iraq. 31 00:02:00,390 --> 00:02:01,530 ‫You API is working. 32 00:02:01,800 --> 00:02:03,410 ‫They are not going to be able to consume this. 33 00:02:03,660 --> 00:02:11,700 ‫So what you need to do is only you could come to the end of your you are query and then this one you 34 00:02:11,700 --> 00:02:14,810 ‫are going to write as dict. 35 00:02:14,940 --> 00:02:17,490 ‫This is dictionary and set it to through again. 36 00:02:17,490 --> 00:02:23,670 ‫So you are going to tell Frappé that I want to return whatever you want to get here as a dictionary. 37 00:02:23,910 --> 00:02:30,120 ‫And when you say that and you go back to this one and send it now you see what you are getting is a 38 00:02:30,120 --> 00:02:33,790 ‫message that is an array of on of an object. 39 00:02:33,810 --> 00:02:42,060 ‫So if you have more than one items within here, what you going to be getting here now is an array of 40 00:02:42,060 --> 00:02:42,600 ‫objects. 41 00:02:42,600 --> 00:02:47,820 ‫But because we have only one item, we have only one object inside of our array. 42 00:02:48,060 --> 00:02:52,920 ‫And when you send this to our front end developer, the able to know what is this is a name. 43 00:02:53,280 --> 00:02:56,030 ‫They know that it was notified by the administrator. 44 00:02:56,040 --> 00:02:57,820 ‫It is owned by the administrator. 45 00:02:58,170 --> 00:02:59,430 ‫This is the naming series. 46 00:02:59,430 --> 00:03:04,240 ‫The item name in all these other details are here so they can take it again. 47 00:03:04,650 --> 00:03:11,280 ‫The other thing that I want to show you before I end this letter is how to to take only what you need 48 00:03:11,610 --> 00:03:13,520 ‫from your API. 49 00:03:13,530 --> 00:03:18,330 ‫So from here I can say I need the name so I can come back to my API. 50 00:03:18,600 --> 00:03:25,680 ‫And instead of selecting all I can just say I want the name and then I want to let me go back to Postman. 51 00:03:26,040 --> 00:03:27,750 ‫What else do I need here? 52 00:03:27,750 --> 00:03:30,650 ‫Remember, you're going to be getting the things that you mean you will be needing. 53 00:03:31,200 --> 00:03:37,620 ‫So I also need that the item name and go back to postwoman. 54 00:03:37,980 --> 00:03:41,390 ‫Everything I need here maybe is the item description. 55 00:03:41,400 --> 00:03:45,510 ‫This may be needed maybe for a mobile app and that continues. 56 00:03:45,690 --> 00:03:50,370 ‫You are going to put everything that you need here and now when you come to your postman and send this, 57 00:03:50,640 --> 00:03:57,680 ‫you are only going to get a message with the items, only the items that you have selected in your query. 58 00:03:57,870 --> 00:03:59,250 ‫So that is how you do it. 59 00:03:59,550 --> 00:04:07,800 ‫So to for you to make any API public or open Europeanised in the way things function, supply or the 60 00:04:07,800 --> 00:04:13,620 ‫waitress, the CORITA supply allow guests and put it to through and then for you to get this thing as 61 00:04:13,620 --> 00:04:14,160 ‫a dictionary. 62 00:04:14,160 --> 00:04:16,710 ‫And so it is consumable by front end applications. 63 00:04:17,190 --> 00:04:20,960 ‫In your query supply, the US additionally equals two. 64 00:04:21,690 --> 00:04:25,680 ‫So thank you so much and see you in the sixth next char.